{include file="Index/header" /} 
    <form action="{:url('Group/groupAdd')}" method="post" />
	    <input type="hidden" name="groupId" value="{$groupId}" />
	    <input type="hidden" name="sbt" value="1">
    	<div class="formbody">
    		<div class="formtitle"><span>用户组<if condition="!$group_id">添加<else />编辑</if></span></div>
		    <ul class="forminfo">
			    <li><label>用户组</label>
			    	<input name="groupName" type="text" class="dfinput" value="{$userGroup.names}" size="30"/></li>
			    <li><label>权限选择</label>
			    	<ul class="group-ul">
			    		{volist name="menu" key="k" id="v"}
			    			<li >
			    				<label class="fleft">
			    					<input type="checkbox"  value="{$k}" class="first_nav_{$k}" onclick="all_opt(this,{$k});"/><strong>{$v.names}</strong>
			    				</label>
			    				{volist name="item_arr[$v[id]]" key="k1" id="v1"}
			    					<label>
			    						<input type="checkbox" name="leftnav[]" {if  in_array($v1[id],$idsArr) } checked {/if} value="{$v1.id}" class="sec_nav_{$k}" />{$v1.names}
			    					</label>
			    				{/volist}
			    			</li>
			    		{/volist}
					</ul>	
				</li>
			    <li><label>&nbsp;</label>
			   		 <input name="sbt" type="submit" class="btn" value="确认保存"/></li>
		    </ul>
    	</div>
	</form>



<script>
	function all_opt(obj,i){
		if($(obj).is(":checked")){
			$(".sec_nav_"+i).attr("checked","checked");
		}else{
			$(".sec_nav_"+i).removeAttr("checked");
		}
	}
</script>
{include file="Index/footer" /}







